<?php

class IndexController extends Controller_Site 
{
	
	public function preDispatch()
	{
		
	}
	
	public function indexAction()
	{
		$tagRowset = $this->getTagService()->getAllTags();
		$this->view->tags = $tagRowset->toArray();
		$newsCriteria = new NewsCriteria();
		$newsCriteria->setLimit(10);
		$newsCriteria->setOrder(NewsPeer::DATE);
		$newsCriteria->setOrderType('desc');
		$newsSelect = $this->getNewsService()->getNewsSelect($newsCriteria);
		
		$newsRowset = NewsPeer::getInstance()->fetchAll($newsSelect);
		$this->view->news = ContentList::fromRowset($newsRowset);
		
		$newsRowset = $this->getNewsService()->getShortNewsList();
		$this->view->shortNews = ContentList::fromRowset($newsRowset);
		
	}
	
	

}
